//
//  YLAdressTableViewCell.m
//  YLFinanceService
//
//  Created by she1323 on 2017/9/8.
//  Copyright © 2017年 she1323. All rights reserved.
//

#import "YLAdressTableViewCell.h"
#import "YLGlobeHeader.h"
#import "YLMyAdressModel.h"
#import "UILabel+Extension.h"
@interface YLAdressTableViewCell ()
@property (nonatomic, strong) IBOutletCollection(UILabel) NSArray *labels;

@property (weak, nonatomic) IBOutlet UILabel *nameTextField;
@property (weak, nonatomic) IBOutlet UILabel *phoneTextField;
@property (weak, nonatomic) IBOutlet UIImageView *icon;
@property (weak, nonatomic) IBOutlet UILabel *adressTextField;

@end

@implementation YLAdressTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.contentView.backgroundColor = YLColor(94, 96, 107);
}

- (void)setModel:(YLMyAdressModel *)model
{
    _model = model;
    
    _nameTextField.text = model.receiveName;
    _phoneTextField.text = model.receiveTel;
    _adressTextField.text = [NSString stringWithFormat:@"%@ %@ %@ \n%@",model.province, model.city, model.area, model.receiveAddress];
    [_adressTextField setLineSpacing:4];
    _model.adress = _adressTextField.text;
    
}


- (void)setHiddenIcon:(BOOL)hiddenIcon
{
    _hiddenIcon = hiddenIcon;
    _icon.hidden = hiddenIcon;
}

+ (NSString *)cellID
{
    return @"YLAdressTableViewCell";
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
